package com.linkhub.oms.data.sync.api.shopify.domain.response;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
/**
 * @ClassName ShopAccessScopesResponse
 * @Description: com.linkhub.oms.data.sync.api.shopify.domain.response
 * @Author: Jaycle
 * @CreateDate: 2025/5/26 21:02
 * @Version: 1.0
 */
@NoArgsConstructor
@Data
public class ShopAccessScopesResponse extends BaseResponse implements Serializable {

    @JSONField(name = "access_scopes")
    private List<AccessScope> accessScopes;

    // 错误时的数据结构
    @JSONField(name = "errors")
    private String errors; // 或使用List<String>根据错误格式调整

    @Data
    @NoArgsConstructor
    public static class AccessScope {
        @JSONField(name = "handle")
        private String handle;
    }

    @Override
    public boolean success() {
        return errors == null || errors.isEmpty();
    }

    @Override
    public int count() {
        return 0;
    }

    @Override
    public String maxUpdateTime() {
        return "";
    }
}
